<div id="nonjob-gauge" style="height: 100%">

</div>
<script type="text/javascript">
    $(function () {
        $.ajax({
            url: "#springUrl('/view/nonjob/gauge')",
            data: {"batchId": "$!{batchId}"},
            type: "POST",
            success: function (text) {
                var d = JSON.parse(text);
                if (d.success && d.data) {
                    var myChart = echarts.init(document.getElementById('nonjob-gauge'), 'macarons');
                    var option = {
                        grid: {
                            top: 20,
                            left: 5,
                            right: 5,
                            bottom: 5,
                            containLabel: true
                        },
                        tooltip: {
                            formatter: "{a} <br/>{b} : {c}%"
                        },
                        toolbox: {

                        },
                        series: [
                            {
                                name: '',
                                type: 'gauge',
                                detail: {formatter: '{value}%'},
                                data: d.data
                            }
                        ]
                    };
                    myChart.setOption(option);
                }
            }
        });
    });
</script>